home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / Apps / ArchiveUtils / nx_arc / arcs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-20  |  1.8 KB  |  52 lines

  1. /*
  2.  * $Log:        arcs.h,v $
  3.  * Revision 1.3  87/08/13  17:05:55  hyc
  4.  * Run thru indent, fixed some signed vs. unsigned problems
  5.  * with bp <-> buf, and inbuf and localbuf...
  6.  *  Revision 1.2  87/07/21  09:09:47  hyc *** empty
  7.  * log message ***
  8.  * 
  9.  */
  10.  
  11. /*
  12.  * ARC - Archive utility - Archive file header format
  13.  * 
  14.  * Version 2.12, created on 12/17/85 at 14:40:26
  15.  * 
  16.  * (C) COPYRIGHT 1985 by System Enhancement Associates; ALL RIGHTS RESERVED
  17.  * 
  18.  * By:  Thom Henderson
  19.  * 
  20.  * Description: This file defines the format of an archive file header,
  21.  * excluding the archive marker and the header version number.
  22.  * 
  23.  * Each entry in an archive begins with a one byte archive marker, which is set
  24.  * to 26.  The marker is followed by a one byte header type code, from zero
  25.  * to 7.
  26.  * 
  27.  * If the header type code is zero, then it is an end marker, and no more data
  28.  * should be read from the archive.
  29.  * 
  30.  * If the header type code is in the range 2 to 7, then it is followed by a
  31.  * standard archive header, which is defined below.
  32.  * 
  33.  * If the header type code is one, then it is followed by an older format
  34.  * archive header.  The older format header does not contain the true length.
  35.  * A header should be read for a length of sizeof(struct heads)-sizeof(long).
  36.  * Then set length equal to size and change the header version to 2.
  37.  * 
  38.  * Programming note: The crc value given in the header is based on the unpacked
  39.  * data.
  40.  * 
  41.  * Language: Computer Innovations Optimizing C86
  42.  */
  43.  
  44. struct heads {            /* archive entry header format */
  45.     char    name[13];        /* file name */
  46.             LONG size;        /* size of file, in bytes */
  47.     unsigned    INT date;    /* creation date */
  48.     unsigned    INT time;    /* creation time */
  49.                 INT crc;    /* cyclic redundancy check */
  50.                 LONG length;    /* true file length */
  51. };
  52.